﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AjaxControlToolkit;
using System.Web.UI;

namespace Kevin.Controls
{
    public class MultiSelect:ScriptControlBase
    {

        public MultiSelect()
            : base(true, HtmlTextWriterTag.Div)
        { }

        protected override void LoadClientState(string clientState)
        {
            base.LoadClientState(clientState);
        }

        protected override string SaveClientState()
        {
            return base.SaveClientState();
        }

        public string Values
        {
            get;
            set;
        }

        public string Texts
        {
            get;
            set;
        }

        #region Helper

        protected V GetPropertyValue<V>(string propertyName, V nullValue)
        {
            if (ViewState[propertyName] == null)
            {
                return nullValue;
            }
            return (V)ViewState[propertyName];
        }


        
        protected void SetPropertyValue<V>(string propertyName, V value)
        {
            ViewState[propertyName] = value;
        }

        #endregion
    }
}
